<?php
require '../../packages/connect_database.php';
mysql_select_db('auction');
$room = $_GET["room"];
$query = mysql_query("SELECT phone FROM auction");
$result = mysql_fetch_row($query);
mysql_query("UPDATE room{$room} SET creator = 0 WHERE phone = '{$_COOKIE["phone"]}'");
mysql_query("UPDATE room{$room} SET creator = 1 WHERE phone = '{$result[0]}'");
echo $result[0];
